package com.googlecode.jbeansdb;

/**
 * This interface defines the behaviour of the entity which will actually
 * store the data.
 * 
 * @author xumingming64398966
 *
 */
public interface StorageEngine {
	
	/**
	 * get the value associated with the specified key.
	 * @param key
	 * @return the value of the speicified key.
	 */
	public Object get(String key);
	
	/**
	 * put the specified name-value pair into db.
	 * @param key
	 * @param value
	 * @return true if successful, otherwise false.
	 */
	public boolean put(String key, String value);
	
	/**
	 * delete the specified key.
	 * @param key
	 * @return true if successful, otherwise false.
	 */
	public boolean delete(String key);
	
	/**
	 * close the engine.
	 */
	public void close();
}
